home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / gcc-lib / i486-unknown-sco3.2v5.0.0elf / 2.6-95q2 / include / oldstyle / math.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-12  |  4.3 KB  |  128 lines

  1. /*
  2.  *   Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
  3.  *        All Rights Reserved.
  4.  *
  5.  *    The information in this file is provided for the exclusive use of
  6.  *    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  7.  *    right to use, modify, and incorporate this code into other products
  8.  *    for purposes authorized by the license agreement provided they include
  9.  *    this notice and the associated copyright notice with any such product.
  10.  *    The information in this file is provided "AS IS" without warranty.
  11.  */
  12.  
  13. /*    Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
  14. /*    Portions Copyright (c) 1979 - 1990 AT&T   */
  15. /*      All Rights Reserved   */
  16.  
  17. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF          */
  18. /*    UNIX System Laboratories, Inc.                          */
  19. /*    The copyright notice above does not evidence any        */
  20. /*    actual or intended publication of such source code.     */
  21.  
  22. #ifndef _MATH_H
  23. #ifndef _PARAMS
  24. #if defined(__STDC__) || defined(__cplusplus)
  25. #define _PARAMS(ARGS) ARGS
  26. #else
  27. #define _PARAMS(ARGS) ()
  28. #endif
  29. #endif /* _PARAMS */
  30. #define _MATH_H
  31.  
  32. #ident "oldstyle @(#) math.h 20.1 94/12/04 "
  33.  
  34. #pragma pack(4)
  35.  
  36.  
  37.  
  38. #ifndef _STRUCT_EXCEPTION
  39. #define _STRUCT_EXCEPTION
  40. struct exception
  41. {
  42.     int    type;
  43.     char    *name;
  44.     double    arg1;
  45.     double    arg2;
  46.     double    retval;
  47. };
  48. #endif /* _STRUCT_EXCEPTION */
  49.  
  50. extern int    matherr _PARAMS((struct exception *));
  51.  
  52.  
  53.  
  54. extern int    errno;
  55.  
  56. extern double    log1p(), expm1();
  57. extern double    atof _PARAMS((const char *)), frexp _PARAMS((double, int *)), ldexp _PARAMS((double, int)), modf _PARAMS((double, double *));
  58. extern double    j0 _PARAMS((double)), j1 _PARAMS((double)), jn _PARAMS((int, double)), y0 _PARAMS((double)), y1 _PARAMS((double)), yn _PARAMS((int, double));
  59. extern double    erf _PARAMS((double)), erfc _PARAMS((double));
  60. extern double    exp _PARAMS((double)), log _PARAMS((double)), log10 _PARAMS((double)), pow _PARAMS((double, double)), sqrt _PARAMS((double));
  61. extern double    floor _PARAMS((double)), ceil _PARAMS((double)), fmod _PARAMS((double, double)), fabs _PARAMS((double));
  62. extern double    gamma _PARAMS((double));
  63. extern double    hypot _PARAMS((double, double));
  64. extern double    sinh _PARAMS((double)), cosh _PARAMS((double)), tanh _PARAMS((double));
  65. extern double    sin _PARAMS((double)), cos _PARAMS((double)), tan _PARAMS((double)), asin _PARAMS((double)), acos _PARAMS((double)), atan _PARAMS((double)), atan2 _PARAMS((double, double));
  66. extern double    scalb _PARAMS((double, double)), logb _PARAMS((double)), nextafter _PARAMS((double, double)), acosh _PARAMS((double)), asinh _PARAMS((double)), atanh _PARAMS((double));
  67. extern double    cbrt _PARAMS((double)), copysign _PARAMS((double, double)), lgamma _PARAMS((double)), rint _PARAMS((double)), remainder _PARAMS((double, double));
  68. extern int    unordered _PARAMS((double, double)), finite _PARAMS((double)), isnan _PARAMS((double)), ilogb();
  69.  
  70. #define MAXFLOAT    ((float)3.40282346638528860e+38)
  71.  
  72. #define HUGE        MAXFLOAT
  73.  
  74. #ifndef HUGE_VAL
  75. extern double __huge_val;
  76. #define HUGE_VAL (__huge_val)
  77. #endif
  78.  
  79.  
  80.  
  81. extern int    signgam;
  82.  
  83. #define M_E        2.7182818284590452354
  84. #define M_LOG2E        1.4426950408889634074
  85. #define M_LOG10E    0.43429448190325182765
  86. #define M_LN2        0.69314718055994530942
  87. #define M_LN10        2.30258509299404568402
  88. #define M_PI        3.14159265358979323846
  89. #define M_PI_2        1.57079632679489661923
  90. #define M_PI_4        0.78539816339744830962
  91. #define M_1_PI        0.31830988618379067154
  92. #define M_2_PI        0.63661977236758134308
  93. #define M_2_SQRTPI    1.12837916709551257390
  94. #define M_SQRT2        1.41421356237309504880
  95. #define M_SQRT1_2    0.70710678118654752440
  96.  
  97.  
  98.  
  99. #define _ABS(x)        ((x) < 0 ? -(x) : (x))
  100.  
  101. #define _REDUCE(TYPE, X, XN, C1, C2)    { \
  102.     double x1 = (double)(TYPE)X, x2 = X - x1; \
  103.     X = x1 - (XN) * (C1); X += x2; X -= (XN) * (C2); }
  104.  
  105. #define DOMAIN        1
  106. #define    SING        2
  107. #define    OVERFLOW    3
  108. #define    UNDERFLOW    4
  109. #define    TLOSS        5
  110. #define    PLOSS        6
  111.  
  112. #define _POLY1(x, c)    ((c)[0] * (x) + (c)[1])
  113. #define _POLY2(x, c)    (_POLY1((x), (c)) * (x) + (c)[2])
  114. #define _POLY3(x, c)    (_POLY2((x), (c)) * (x) + (c)[3])
  115. #define _POLY4(x, c)    (_POLY3((x), (c)) * (x) + (c)[4])
  116. #define _POLY5(x, c)    (_POLY4((x), (c)) * (x) + (c)[5])
  117. #define _POLY6(x, c)    (_POLY5((x), (c)) * (x) + (c)[6])
  118. #define _POLY7(x, c)    (_POLY6((x), (c)) * (x) + (c)[7])
  119. #define _POLY8(x, c)    (_POLY7((x), (c)) * (x) + (c)[8])
  120. #define _POLY9(x, c)    (_POLY8((x), (c)) * (x) + (c)[9])
  121.  
  122.  
  123.  
  124. #pragma pack()
  125.  
  126.  
  127. #endif /* _MATH_H */
  128.